CREATE TABLE cv$_source
(
	id									INTEGER,
	source_schema_name	VARCHAR2(32),
	source_table_name		VARCHAR2(32),
	pk_col_names				VARCHAR2(512),
	change_table_schema	VARCHAR2(32),
	change_table_name		VARCHAR2(32),
	change_set_name			VARCHAR2(32),
	subscription_handle	NUMBER,
	subscription_schema_name	VARCHAR2(32),
	subscription_name		VARCHAR2(32),
	view_name						VARCHAR2(32),
	serial_num					INTEGER,
	capture_col_names 	VARCHAR2(1024),
	capture_values	VARCHAR2(4) CONSTRAINT cv_source_capture_values_chk CHECK (capture_values IN ('NEW', 'OLD', 'BOTH')),
	source_colmap		VARCHAR2(1) CONSTRAINT cv_source_source_colmap_chk CHECK (source_colmap IN ('Y', 'N')),
	condition VARCHAR2(1024),
	CONSTRAINT cv$_source_pk PRIMARY KEY(id)
		USING INDEX
		(
			CREATE UNIQUE INDEX cv$_source_pk_odx ON cv$_source(id ASC)
		)
);

CREATE INDEX cv$_source_source_table_idx ON cv$_source(source_schema_name	ASC, source_table_name ASC);
